import yaml

def read_yaml(path):
    with open(path, 'r', encoding='utf-8') as f:
        data = yaml.safe_load(f)
    return [
        (
            case.get('navTabId'),    # 允许字段缺失（返回None）
            case.get('callbackType'),
            case.get('forwardUrl'),
            case.get('productCode'),
            case.get('productName'),
            case.get('note')         # 用于断言的用例描述
        )
        for case in data
    ]
#读取config.yaml方法
def read_config(path,env="test"):
    with open(path,'r',encoding='utf-8') as f:
        config=yaml.safe_load(f)
    return config[env]